﻿@model SportStore.Domain.Entities.ShippingDetails

@{
    ViewBag.Title = "SportStore: CheckOut";
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>CheckOut</title>
</head>
<body>
    <h2>Check Out Now</h2>
    <p>Please enter your details, and We'll ship your goods right away!</p>

    @using (Html.BeginForm())
    {
        <h3>Ship to:</h3>
        <div class="form-group">
            <label>Name</label>
            @Html.TextBoxFor(x => x.Name, new { @class = "form-control" })
        </div>

        <h3>Address</h3>

        foreach (var property in ViewData.ModelMetadata.Properties)
        {
            if (property.PropertyName != "Name" && property.PropertyName != "GiftWrap")
            {
                <div class="form-group">
                    <label>@(property.DisplayName ?? property.PropertyName)</label>
                    @Html.TextBox(property.PropertyName, null, new { @class = "form-control" })
                </div>
            }
        }

        <h3>Options</h3>
        <div class="checkbox">
            @Html.EditorFor( x => x.GiftWrap)
            Gift Wrap These Items
        </div>

        <div class="text-center">
            <input class="btn btn-primary" type="submit" value="Complete Order" />
        </div>


    }

</body>
</html>
